#include <iostream>
#include <future>
#include "ThreadPool.hpp"

int add(int op1, int op2)
{
    return op1 + op2;
}

int main()
{
    ThreadPool tp;

    std::future<int> fut1 = tp.submit(add, 11, 22);
    std::future<int> fut2 = tp.submit(add, 22, 33);
    std::future<int> fut3 = tp.submit(add, 33, 44);

    std::cout << "future1: " << fut1.get() << std::endl;
    std::cout << "future2: " << fut2.get() << std::endl;
    std::cout << "future3: " << fut3.get() << std::endl;

    return 0;
}